package online.heycm.rbac.param.basic;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author hey
 * @version 1.0
 * @date 2024/1/17 17:31
 */
@Data
public class ResourceAddReq implements Serializable  {

    private static final long serialVersionUID = -3555049957476903907L;

    /**
     * 父id
     */
    private Integer pid;

    /**
     * 资源类型：0-菜单 1-路由 2-按钮
     */
    @NotNull
    private Integer resourceType;

    /**
     * 资源名称
     */
    @NotBlank
    private String resourceName;

    /**
     * 资源值
     */
    private String resourceValue;

    /**
     * icon
     */
    private String icon;

    /**
     * 元数据
     */
    private String metadata;

    /**
     * 顺序
     */
    private Integer sort;

    /**
     * 状态：0-禁用 1-启用
     */
    @NotNull
    @Max(1)
    @Min(0)
    private Integer sts;
}
